﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MetadataBasedConfigArch.Web
{
    public static class Util
    {
        #region Common Properties

        public static Int64 TenantID
        {
            get
            {
                return Convert.ToInt64(HttpContext.Current.Session["TenantID"]??0);
            }
            set
            {
                HttpContext.Current.Session["TenantID"] = value;
            }
        }

        public static Int64 UserID
        {
            get
            {
                return Convert.ToInt64(HttpContext.Current.Session["UserID"] ?? 0);
            }
            set
            {
                HttpContext.Current.Session["UserID"] = value;
            }
        }
        #endregion

        #region Methods

        public static string CreateNewDocumentPath()
        {
            return HttpContext.Current.Server.MapPath("~/Upload/" + Guid.NewGuid().ToString("N"));            
        }

        #endregion

    }
}